package com.sunny.ynhz.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

import io.realm.annotations.PrimaryKey;


/**
 * Created by luao on 2017/7/20.
 */

public class ProblemBean {
    /**
     * data : [{"id":"","problemid":"1","type":"污水排放","time":"2017-07-20 14:30:43","position":"天河区","describe":"工业污水排放河涌","patrolid":"1","picture":"1.jpg","video":"","lgtd":"","lttd":"","userId":"1","state":"","pro_resource":"市民投诉"}]
     * code : 1
     * msg : 数据查询成功！
     */

    private int code;
    private String msg;
    private List<DataBean> data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        public DataBean() {
        }

        /**
         * id :
         * problemid : 1
         * type : 污水排放
         * time : 2017-07-20 14:30:43
         * position : 天河区
         * describe : 工业污水排放河涌
         * patrolid : 1
         * picture : 1.jpg
         * video :
         * lgtd :
         * lttd :
         * userId : 1
         * state :
         * pro_resource : 市民投诉
         */
        @PrimaryKey
        private String id;
        private String problemid;
        private String type;
        private String time;
        /**
         * 地理位置
         */
        private String position;
        /**
         * 问题详情
         */
        private String describe;
        /**
         * 巡河id
         */
        private String patrolid;
        /**
         * 图片字符串“;”作为间隔
         */
        private String picture;
        /**
         * 同图片
         */
        private String video;
        /**
         * 经度
         */
        private Double lgtd;
        /**
         * 纬度
         */
        private Double lttd;
        /**
         * 用户id
         */
        private String userId;
        /**
         * 状态,首页那五个状态
         */
        private String state;
        /**
         * 问题来源
         */
        private String pro_resource;

        public String getNativeprocessing() {
            return nativeprocessing;
        }

        public void setNativeprocessing(String nativeprocessing) {
            this.nativeprocessing = nativeprocessing;
        }

        public String getIspatrol() {
            return ispatrol;
        }

        public void setIspatrol(String ispatrol) {
            this.ispatrol = ispatrol;
        }

        public static Creator<DataBean> getCREATOR() {
            return CREATOR;
        }

        /**
         * 1：本级处理；0：上报
         */
        private String nativeprocessing;

        /**
         * 1:巡河问题 2:非巡河问题
         */
        private String ispatrol;


        protected DataBean(Parcel in) {
            id = in.readString();
            problemid = in.readString();
            type = in.readString();
            time = in.readString();
            position = in.readString();
            describe = in.readString();
            patrolid = in.readString();
            picture = in.readString();
            lttd = in.readDouble();
            lgtd = in.readDouble();
            video = in.readString();
            userId = in.readString();
            state = in.readString();
            pro_resource = in.readString();
            addvcd = in.readString();
            nativeprocessing = in.readString();
            ispatrol = in.readString();
            imagePaths = in.createStringArrayList();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeString(problemid);
            dest.writeString(type);
            dest.writeString(time);
            dest.writeString(position);
            dest.writeString(describe);
            dest.writeString(patrolid);
            dest.writeString(picture);
            dest.writeDouble(lttd);
            dest.writeDouble(lgtd);
            dest.writeString(video);
            dest.writeString(userId);
            dest.writeString(state);
            dest.writeString(pro_resource);
            dest.writeString(addvcd);
            dest.writeString(nativeprocessing);
            dest.writeString(ispatrol);
            dest.writeStringList(imagePaths);
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        public String getAddvcd() {
            return addvcd;
        }

        public void setAddvcd(String addvcd) {
            this.addvcd = addvcd;
        }

        /**
         * 行政编码
         */
        private String addvcd;

        public ArrayList<String> getImagePaths() {
            return imagePaths;
        }

        public void setImagePaths(ArrayList<String> imagePaths) {
            this.imagePaths = imagePaths;
        }

        /**
         * 图片路径（只用于本地）
         */
        private ArrayList<String> imagePaths;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getProblemid() {
            return problemid;
        }

        public void setProblemid(String problemid) {
            this.problemid = problemid;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getTime() {
            return time;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public String getPosition() {
            return position;
        }

        public void setPosition(String position) {
            this.position = position;
        }

        public String getDescribe() {
            return describe;
        }

        public void setDescribe(String describe) {
            this.describe = describe;
        }

        public String getPatrolid() {
            return patrolid;
        }

        public void setPatrolid(String patrolid) {
            this.patrolid = patrolid;
        }

        public String getPicture() {
            return picture;
        }

        public void setPicture(String picture) {
            this.picture = picture;
        }

        public String getVideo() {
            return video;
        }

        public void setVideo(String video) {
            this.video = video;
        }

        public Double getLgtd() {
            return lgtd;
        }

        public void setLgtd(Double lgtd) {
            this.lgtd = lgtd;
        }

        public Double getLttd() {
            return lttd;
        }

        public void setLttd(Double lttd) {
            this.lttd = lttd;
        }

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        public String getPro_resource() {
            return pro_resource;
        }

        public void setPro_resource(String pro_resource) {
            this.pro_resource = pro_resource;
        }

        @Override
        public int describeContents() {
            return 0;
        }


        @Override
        public String toString() {
            return "DataBean{" +
                    "id='" + id + '\'' +
                    ", problemid='" + problemid + '\'' +
                    ", type='" + type + '\'' +
                    ", time='" + time + '\'' +
                    ", position='" + position + '\'' +
                    ", describe='" + describe + '\'' +
                    ", patrolid='" + patrolid + '\'' +
                    ", picture='" + picture + '\'' +
                    ", video='" + video + '\'' +
                    ", lgtd=" + lgtd +
                    ", lttd=" + lttd +
                    ", userId='" + userId + '\'' +
                    ", state='" + state + '\'' +
                    ", pro_resource='" + pro_resource + '\'' +
                    ", nativeprocessing='" + nativeprocessing + '\'' +
                    ", ispatrol='" + ispatrol + '\'' +
                    ", addvcd='" + addvcd + '\'' +
                    ", imagePaths=" + imagePaths +
                    '}';
        }
    }
}
